Handle no next run in dags next-execution --table#67395
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
| if info is None: | ||
| print( | ||
| "[WARN] No following schedule can be found. " | ||
| "This DAG may have schedule interval '@once' or `None`.", |
There was a problem hiding this comment.
| "This DAG may have schedule interval '@once' or `None`.", | |
| "This Dag may have schedule interval '@once' or `None`.", |
| if info is None: | ||
| print( | ||
| "[WARN] No following schedule can be found. " | ||
| "This DAG may have schedule interval '@once' or `None`.", |
There was a problem hiding this comment.
| "This Dag may have schedule interval '@once' or `None`.", |
just for keep consistnecy
23tae
left a comment
There was a problem hiding this comment.
Great fix for the CLI crash and excellent test coverage!
Left a minor inline suggestion regarding consistency.
LGTM!
| "This DAG may have schedule interval '@once' or `None`.", | ||
| file=sys.stderr, | ||
| ) | ||
| break |
There was a problem hiding this comment.
The iter_next_dagrun_info() generator naturally exhausts itself on None, making this break technically unnecessary.
For consistency with the existing non---table block below, we can just remove it here. No pressure though, either way is fine.
|
@fallintoplace A few things need addressing before review — see our Pull Request quality criteria.
No rush. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. Drafted-by: Claude Code (Opus 4.7); reviewed by @potiuk before posting |
What this does
Nonesentinel inairflow dags next-execution --tableschedule=Noneand@oncewith--num-executions 2 --tableWhy
The non-table path already handles the "no next run" case, but the table path iterated over
DagRunInfo | Noneand applied attribute getters unconditionally. That could raise when a DAG hasschedule=None, or when an@onceDAG is asked for additional executions.Closes #67394.
Testing